<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>骨医快线</title>
	<link rel="stylesheet" href="../../css/mui.plus.css" />
</head>
<body>
	<header class="mui-bar mui-bar-nav pri-bar">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">设置</h1>
	</header>
	<div class="mui-content">
		<ul class="mui-table-view">
			<li class="mui-table-view-cell" data-link='../login/forget.html'>
				<a class="mui-navigate-right">
					修改密码
				</a>
			</li>
			<li class="mui-table-view-cell">
				<a class="mui-navigate-right">
					给我评分
				</a>
			</li>
			<li class="mui-table-view-cell" data-link='setting/about.html'>
				<a class="mui-navigate-right">
					关于
				</a>
			</li>
		</ul>
		
		<div style="width: 80%;position: absolute;left:10%; bottom: 50px;">
			<button id="btnLogout" type="button" class="mui-btn mui-btn-grey mui-btn-block" style="">退出</button>
		</div>
	</div>
	
	<script src="../../js/mui.min.js"></script>
	<script src="../../js/app.js"></script>
	<script>
		(function($){
			
			$.plusReady(function(){
				
				$('.mui-content').on('tap', '#btnLogout', function(){
					app.storage.removeUserInfo();
					
					var pages = plus.webview.all();
					for(var i in pages){
						$.fire(pages[i], 'start', null);
					}
					
					$.openWindow({
						url: '../login/login-main.html',
						waiting : {
							autoShow : false
						}
					});
				});
				
				$('.mui-table-view').on('tap', 'li', function(){
					var url = this.dataset.link;
					
					if(url){
						$.openWindow({
							url: url,
							waiting: {
								autoShow: false
							}
						});
					}else if(plus.os.name.toUpperCase() === 'IOS'){
						plus.runtime.openURL('https://itunes.apple.com/cn/app/gu-yi-kuai-xian-yi-sheng/id1121947372');
					}else{
						$.toast('此功能在该平台尚未开放');
					}
				});
				
			});
			
		}(mui));
	</script>
</body>
</html>